<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<style>
    .tab-tl li {
        list-style: none;
        float: left;
        margin: 10px;
    }
    
    .tab-con {
        clear: both;
        margin: 6%;
    }
    
    .tab-con div {
        margin: 10px;
    }
    
    .tab-tl .active {
        color: #9f0;
        border-bottom: 1px solid #9f0;
    }
</style>

<body>
    <div id="root">
        <ul class="tab-tl">
            <li @click='cur=0' :class='{active:cur==0}'>内容一</li>
            <li @click='cur=1' :class='{active:cur==1}'>内容二</li>
            <li @click='cur=2' :class='{active:cur==2}'>内容三</li>
        </ul>
        <div class="tab-con">
            <div v-show="cur==0">我是内容一</div>
            <div v-show="cur==1">我是内容二</div>
            <div v-show="cur==2">我是内容三</div>
        </div>
        <div class="tab-tl">
            <li v-for="(v,i) in tabletle" @click="cur2=i" :class="{active:cur2==i}">{{v}}</li>
        </div>
        <div class="tab-con">
            <div v-for="(v,i) in tablecon" v-show="cur2==i">{{v}}</div>
        </div>
    </div>
</body>
<script>
    window.onload = function() {
        new Vue({
            el: "#root",
            data: {
                cur: 0,
                cur2: 0,
                tabletle: ["标题1", "标题2", "标题3"],
                tablecon: ['111', '222', '333']
            }
        })
    }
</script>

</html>